<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
<form method="post">
    <label>Categories:</label>
    <input type="text" name="categories" />
    <label>Tags:</label>
    <input type="text" name="tags" />
    <label>Months:</label>
    <input type="text" name="months" />
    <input type="submit" value="Generate" />
</form>
<?php
if (isset($_POST['categories']) && isset($_POST['tags']) && isset($_POST['months'])) {
    $categories = explode(", ", $_POST['categories']);
    $tags = explode(", ", $_POST['tags']);
    $months = explode(", ", $_POST['months']);

    $result = "<div class='ui sidebar'>Categories:<ul>";

    foreach ($categories as $category) {
        $result .= "<li>$category</li>";
    }

    $result .= "</ul></div><div class='ui sidebar'>Tags:<ul>";

    foreach ($tags as $tag) {
        $result .= "<li>$tag</li>";
    }

    $result .= "</ul></div><div class='ui sidebar'>Months:<ul>";

    foreach ($months as $month) {
        $result .= "<li>$month</li>";
    }

    $result .= "</ul></div>";

    echo $result;
}
?>
</body>
</html>